package com.ant.storage.dto;

import com.ant.storage.common.PageRequest;
import com.ant.storage.vo.CommodityVo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author hzd
 * @version 1.0
 * @date 2022/3/16 16:19
 */
@Data
public class SubscribeDto  extends PageRequest {

    @ApiModelProperty(value = "申请id ")
    private Integer id;

    @TableField("city_id")
    private List<Integer> cityId;

    @NotNull(message = "申请部门不能为空")
    @ApiModelProperty(value = "申请部门")
    private Integer departmentId;

    @ApiModelProperty(value = "采购清单编号")
    @TableField("subscribe_number")
    private String subscribeNumber;

    @NotEmpty(message = "采购类型不能为空")
    @ApiModelProperty(value = "采购类型")
    @Min(value = 1, message = "采购类型id")
    @TableField("purchase_type")
    private String purchaseType;

    @NotNull(message = "数量不能为空")
    @ApiModelProperty(value = "数量")
    @Min(value = 1, message = "请填写正确的数字")
    private Integer total;

    @NotNull(message = "实际金额不能为空")
    @ApiModelProperty(value = "采购金额")
    private BigDecimal price;

    @NotNull(message = "申请金额不能为空")
    @ApiModelProperty(value = "申请金额")
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "支付方式")
    @TableField("pay_type")
    private String payType;

    @ApiModelProperty(value = "物品方式")
    private String goodsType;

    @ApiModelProperty(value = "审核状态")
    private String processState;

    @ApiModelProperty(value = "是否报销")
    private Integer reimbursement;

    @ApiModelProperty(value = "采购人id")
    @TableField("purchaser_id")
    private String purchaserId;

    @NotNull(message="申请人不能为空")
    @ApiModelProperty(value = "申请人")
    @Min(value = 1, message = "填写申请人id")
    @TableField("proposer_id")
    private Integer proposerId;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "状态 ")
    private String status;

    @ApiModelProperty(value = "单个状态查询")
    private String states;

    @TableField("creator_by")
    private String creatorBy;

    @ApiModelProperty(value = "创建时间人")
    private Date creationTime;

    @ApiModelProperty(value = "物品列表列表")
    private List<CommodityVo>  commodityList;

    @ApiModelProperty(value = "审核人")
    @TableField(exist = false)
    private List<String> approval;

    @ApiModelProperty(value = "抄送人")
    @TableField(exist = false)
    private List<String> notify;

    @ApiModelProperty(value = "时间")
    private List<String> times;

    @ApiModelProperty(value = "物品名称")
    private String commodityName;

}
